/*
 * Event 0.0.1 - 事件触发类
 *
 * Copyright (c) 2008 Dalton (9wee.com)
 *
 *
 * $Date: 2008-12-17 $
 * $Rev: 01 $
 *
 --------------------------------------------------
 更新日志


 */

function Event() {
	this.funcName;
	this.parmas;
}

Event.prototype = {
	callFunction: function() {
		eval(this.funcName)(this.parmas);
	}
};

function talk(parmas) {
	//alert("忽悠，一切都是忽悠")
	popups.createPopup('Confirm', parmas.content, function() {}).show();
}

function changeMap(parmas) {
	var result = parmas.exit.split('_');

	loadJS("mapJs", "js/maps/" + parmas.mapId + ".js");
	mygame.clearMinimap();
	mygame.addUser(mygame.curUser, "./images/dalton.gif", 32, 32, parseInt(result[0]), parseInt(result[1]), 30, 120);
	gameSocket.send('P|U_' + parmas.mapId + '|U_' + mygame.sceneId + "|" + parmas.exit);
	mygame.sceneId = parmas.mapId;

}